import config from '../../assets/js/conf/config';
import {request} from '../../assets/js/utils/request';

//会员登录
export function loginData(data) {
    return request(config.baseUrl+"/home/user/pwdlogin?token="+config.token,"post",data);
}

//会员登录认证
export function authLogin(data) {
    return request(config.baseUrl+"/home/user/safe?token="+config.token,"post",data);
}

//会员安全退出
export function outLogin(data) {
    return request(config.baseUrl+"/home/user/safeout?token="+config.token,"post",data);
}

//头像上传
export function uploadHeadData(data) {
    return request(config.baseUrl+"/user/myinfo/formdatahead?token="+config.token,"file",data,data.config)
}

//获取用户信息
export function getUserInfo({ uid }){
    return request(config.baseUrl+"/user/myinfo/userinfo/uid/"+uid+"?token="+config.token);
}

//修改会员信息
export function updateUser(data){
    return request(config.baseUrl+"/user/myinfo/updateuser?token="+config.token, "post", data);
}